//
//  RichScanViewController.m
//  QuanZiChat
//
//  Created by 张洪林 on 15/11/25.
//  Copyright © 2015年 ZhongHongLin. All rights reserved.
//

#import "RichScanViewController.h"
#import "QRCodeGenerator.h"
#import <ZBarSDK.h>
@interface RichScanViewController ()<ZBarReaderDelegate>

@end

@implementation RichScanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
//点击扫描二维码
- (IBAction)scanBtnClick:(id)sender {
    //创建扫描界面
    ZBarReaderViewController *readVC = [ZBarReaderViewController new];
    readVC.readerDelegate = self;
    //设置支持方向
    readVC.supportedOrientationsMask = ZBarOrientationMaskAll;
    //设置图片扫描器
    ZBarImageScanner *scanner = readVC.scanner;
    //配置扫描器
    [scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0];
    
    [self showViewController:readVC sender:nil];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
